package com.client.service;

import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.client.mapper.CommentMapper;
import com.client.pojo.Comment;

@Service
public class CommentServiceImpl implements CommentService{
	
	@Autowired
	private CommentMapper comMapper;
	
	//查询评论
	@Override
	public List<Comment> selectCom(Integer postId) {
		
		return comMapper.selectCom(postId);
	}

	@Override
	public void insertCom(String username, Integer postId, String comment, Date date) {
		// TODO Auto-generated method stub
		System.err.println("ssssssssssssss进入轨道");
		System.out.println(""+username+","+postId+","+comment+","+date+"dddddddddd");
		comMapper.insertCom(username, postId, comment, date);
		
		
	}

	

}
